package com.mall.server.controller;

import com.mall.commons.R;
import com.mall.server.service.OmscompanyAddressService;
import com.tanhua.model.domain.OmsCompanyAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/companyAddress")
public class OmscompanyAddressController {

    @Autowired
    private OmscompanyAddressService omscompanyAddressService;

    /**
     * 获取所有收货地址
     *
     * @return
     */
    @GetMapping("/list")
    public R list() {
        List<OmsCompanyAddress> omscompanyAddress = omscompanyAddressService.list();
        return R.success(omscompanyAddress);
    }
}
